
// 引入mongoose
const mongoose = require('mongoose')


// 建立 连接  

function  createConnect(){
     mongoose.connect('mongodb://127.0.0.1:27017/test2306')
     
     let db = mongoose.connection  

     db.once('open',()=>{
        console.log('数据库连接成功！')
     })
     
}



module.exports = {
    createConnect
}